<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>响应式简单个性个人博客模板</title>
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<link rel="stylesheet" type="text/css" href="statics/css/index.css" media="all" />
	<link rel="stylesheet" type="text/css" href="layui/layui.css" media="all" />
	<script type="text/javascript" src="layui/layui.all.js"></script>
</head>
<body>
		<jsp:include   page="top.jsp" flush="true"/>
		<div id="main" class="content">
			<div class="container">
				<article itemscope="itemscope">
					<div class="posts-list js-posts">
						<!-- <div class="post post-layout-list" data-aos="fade-up">
							<div class="status_list_item icon_kyubo">
								<div class="status_user" style="background-image: url(statics/images/b0ce3f3cde0c084b6d42321b2dcbc407.jpeg);">
									<div class="status_section">
										<a href="detail.html" class="status_btn">交代是不可能交代的</a>
										<p class="section_p">相隔上一次的更新我掰手指数一数，下意识的双腿一软，给各位小哥哥小姐姐们跪下了。自从有了对象后，周末几乎落下了主题的进度（邪魅的笑）。一边开发新的主题，一边收集您们给我反馈回来的"臭虫"，还有新的主题后台看见了一些大神在... </p>
									</div>
								</div>
							</div>
						</div> -->
					<div id="box">
						<c:forEach var="list" items="${myblogs}">
						<div class="post post-layout-list" data-aos="fade-up">
							<div class="postnormal review ">
								<div class="post-container review-item">
									<div class="row review-item-wrapper">
										<div class="col-sm-3">
											<a rel="nofollow" href="checkblogs?blogs_id=${list.blogs_id }" target="_blank">
												<div class="review-item-img" style="background-image: url(statics/images/b0ce3f3cde0c084b6d42321b2dcbc407.jpeg);"></div>
											</a>
										</div>
										<div class="col-sm-9 flex-xs-middle" style="color: black;">
											<div class="review-item-title">
												<a href="checkblogs?blogs_id=${list.blogs_id }" target="_blank" rel="bookmark" style="color:black;">${list.blogs_title }</a>
											</div>
											<div class="review-item-creator"><b>发布日期：</b>${ list.blogs_createtime }</div>
											<span class="review-item-info"><b>点赞数：</b>${ list.blogs_dzcount }</span>
										</div>
									</div>
									<div class="review-bg-wrapper">
										<div class="bg-blur" style="background-image: url(statics/images/diego-ph-249471-2-800x1000.jpg);"></div>
									</div>
								</div>
								<div class="post-container">
									<%-- <div class="entry-content">${ list.blogs_content}</div> --%>
									<div class="post-footer">
										<a class="gaz-btn primary" href="checkblogs?blogs_id=${list.blogs_id }" target="_blank">READ MORE</a>
										 <!-- <span class="total-comments-on-post pull-right"><a href="">编辑 </a></span> -->
										 <span class="total-comments-on-post pull-right"><a href="javascript:void(0)" onClick="del(${list.blogs_id })">删除 &nbsp;&nbsp;&nbsp;&nbsp;</a></span>
									</div>
								</div>
							</div>
						</div>
						</c:forEach>
						</div>
					</div>
				</article>
			</div>
		</div>

		<footer id="footer" class="overlay animated from-top" style="text-align: center;">
			<div class="decor-wrapper">
				<svg id="footer-decor" class="decor top" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" preserveAspectRatio="none">
					<path class="large left" d="M0 0 L50 50 L0 100" fill="rgba(255,255,255, .1)"></path>
					<path class="large right" d="M100 0 L50 50 L100 100" fill="rgba(255,255,255, .1)"></path>
					<path class="medium left" d="M0 0 L50 50 L0 66.6" fill="rgba(255,255,255, .3)"></path>
					<path class="medium right" d="M100 0 L50 50 L100 66.6" fill="rgba(255,255,255, .3)"></path>
					<path class="small left" d="M0 0 L50 50 L0 33.3" fill="rgba(255,255,255, .5)"></path>
					<path class="small right" d="M100 0 L50 50 L100 33.3" fill="rgba(255,255,255, .5)"></path>
					<path d="M0 0 L50 50 L100 0 L0 0" fill="rgba(255,255,255, 1)"></path>
					<path d="M48 48 L50 51 L52 48 L48 48" fill="rgba(255,255,255, 1)"></path>
				</svg>
			</div>
		</footer>
			<jsp:include   page="bottom.jsp" flush="true"/>
</body>
<script type="text/javascript">
	function del(id){
		layer.confirm('您确定要删除这条数据吗？', {
				btn: ['确定','取消'] //按钮
			}, 
			function(){
				layer.closeAll('dialog');
				$.ajax({
					type: "post",
					url: "delblogs",
					data: {
						_method:"DELETE",
						"id": id
					},
					success : function(data){
					 	alert(data);
					 	if(data){
					 		window.location.reload();
					 	}
					}
				});
			})
	}
</script>
</html>